Skip to content

Give pressure points and supporting detail a suggested improvement built from facts - #79

Merged
Pranav-Mathad merged 1 commit into
issue-12-found-problemsfrom
issue-74-suggested-improvements
Nov 29, 2026
Merged

Pranav-Mathad merged 1 commit into
issue-12-found-problemsfrom
issue-74-suggested-improvements

Conversation

@Pranav-Mathad

Copy link
Copy Markdown
Owner

Closes #74. Implements the spec text in #78.

This pull request targets issue-12-found-problems (#77), not main: it edits files #77 already changed, and its output has to be in the final runs that #77 publishes.

What changes

  • src/codexray/report/templates.py: _fix now gives three more finding types a fix sentence built from the finding's stored facts and targets. No AI call, no new fact, no settings change.

    Type Action Sentence
    Shaky foundation split_by_responsibility Separate the part of {file} that changes often from the part that stays, so its {direct_users} direct users depend only on the part that stays.
    Hidden partners extract_interface Move what {a} and {b} share into one place that both use. If they must stay apart, a note in each that names the other makes the pairing visible.
    Large, complex, often changed split_by_responsibility Split {top_functions} into smaller functions. No other function in {file} has more branches.

    When a value the sentence needs is missing, the fix is empty with action none. An action with empty text is never produced.

  • web/src/screens/decisions/FixFirst.tsx, words.ts: "No fix proposed." becomes "No improvement proposed.", the wording of the spec.

All other finding types behave as before. Nothing in settings/, repository/, judge/, core/, or report/{__init__,assemble,bundle}.py is touched, so no run is invalidated.

What I ran and saw

codexray report on a private copy of complete runs of all three repositories: once before the change, twice after. No other stage was run and no AI call was made.

Repo Findings Top 10 with fix text, before After Top 10 saying "No improvement proposed."
artemis 257 3 9 1 (broken_rule)
graylog 220 3 8 2 (foundation_on_features)
shopware 199 1 5 5 (foundation_on_features, overloaded_class, broken_rule)
  • The findings still without a fix are types the AI job judges. They get their fix from codexray judge; with AI off they say "No improvement proposed."
  • Second run: findings.json and every bundle JSON file have the same sha256 as the first, for all three repositories.
  • Before against after: only judgement.fix and summary differ, and only on the three types. The order of finding ids and every priority value are unchanged.
  • No finding has an action other than none with empty text.
  • All three types stay "not simulated": simulate() in judge/jobs.py returns before the link-removing branch when a finding has no source and target pair (lines 257 to 260). This is read from the code; judge was not run.
  • make check passes: ruff, 36 Python tests passed and 1 skipped, web contracts, typecheck, 4 web tests, build.

Rank 1 as rendered:

  • artemis: Separate the part of src/main/java/de/tum/cit/aet/artemis/core/config/Constants.java that changes often from the part that stays, so its 947 direct users depend only on the part that stays.
  • graylog: the same sentence for graylog2-web-interface/src/components/common/index.tsx, 866 direct users.
  • shopware: the same sentence for src/Core/Framework/Feature.php, 522 direct users.

Not done, and limits

  • The Decisions screen was not opened in a browser. The issue asks for the first ten suggestions to be read on screen against the code. I read the rendered sentences in findings.json, not the screen and not the code they point to.
  • The report runs were made on the commit before the last one on Fix the problems found on the three repositories and publish the judged results #77 (e6c57e6). After moving onto 8859318, which changes report/assemble.py and bundle.py, only make check was run again. The final runs in Fix the problems found on the three repositories and publish the judged results #77 are the real check.
  • These are standard remedies by finding type, as the spec states. For a file that mostly re-exports other files, or for two partner files in different languages, the sentence is correct but general. The second sentence for hidden partners covers the case where they cannot share one place.
  • summary gets long for two types. It is the summary sentence plus the fix sentence, the same mechanism the cheap loop uses, so hidden partners name both paths twice (up to 738 characters on artemis) and the large-file type names its functions twice. Shortening it means changing report/assemble.py, which is frozen until Fix the problems found on the three repositories and publish the judged results #77 lands.

@Pranav-Mathad
Pranav-Mathad merged commit 6cf1072 into issue-12-found-problems Nov 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant